class FormConfigManager {
    constructor() {

    }

    getFieldSelect(selectValue) {
        let html = `
        <div class="form-group">
          <label>Model字段</label>
          <select id="fieldKey">
            ${this.getFieldSelectOptions(selectValue)}
          </select>
        </div>`
        return html;
    }
    getFieldSelectOptions(selectValue) {
        const modelFields = formConfig.metadata.fields || [];
        let fieldKeyOptions = '<option value="">请选择字段</option>';
        modelFields.forEach(fieldName => {
            fieldKeyOptions += `<option value="${fieldName}" ${selectValue === fieldName ? 'selected' : ''}>${fieldName}</option>`;
        });
        return fieldKeyOptions;
    }
}
export default new FormConfigManager();